package com.cskaoyan.mapper;

import com.cskaoyan.bean.MarketCategory;
import com.cskaoyan.bean.MarketCategoryExample;
import java.util.List;

import com.cskaoyan.bean.MarketGoods;
import com.cskaoyan.bean.MarketGoodsExample;
import com.cskaoyan.bean.vo.admin.category.MarketCategoryL1Vo;
import com.cskaoyan.bean.vo.admin.category.MarketCategoryListVo;
import com.cskaoyan.bean.vo.admin.goods.GoodsInnerBrandVO;
import com.cskaoyan.bean.vo.admin.goods.GoodsInnerCatVO;
import com.cskaoyan.bean.vo.wx.HomeIndexInnerFloorGoodsListVO;
import org.apache.ibatis.annotations.Param;

public interface MarketCategoryMapper {
    long countByExample(MarketCategoryExample example);

    int deleteByExample(MarketCategoryExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketCategory record);

    int insertSelective(MarketCategory record);

    List<MarketCategory> selectByExample(MarketCategoryExample example);

    MarketCategory selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketCategory record, @Param("example") MarketCategoryExample example);

    int updateByExample(@Param("record") MarketCategory record, @Param("example") MarketCategoryExample example);

    int updateByPrimaryKeySelective(MarketCategory record);

    int updateByPrimaryKey(MarketCategory record);


    List<GoodsInnerCatVO> selectGoodsInnerCatVO();

    List<GoodsInnerBrandVO> selectGoodsInnerBrandVO();

    /**
     * 查询所有的商品种类
     * @return 种类信息
     */
    List<MarketCategoryListVo> selectAllCategories();

    List<Integer> selectIds(Integer categoryid);

    List<MarketCategoryL1Vo> selectAllCategoriesWithLevelL1();

    int updateDeletedById(Integer id);

    List<MarketCategory> selectAll();

    List<HomeIndexInnerFloorGoodsListVO> selectFloorGoodsList(@Param("cat") int market_wx_catlog_list);

    List<MarketCategory> selectBrothers(Integer pid);

    MarketCategory selectParent(Integer pid);
    /**
     * 查询1级目录下的所有2级目录
     * @param id 一级目录的id
     * @return 所有二级目录
     */
    List<MarketCategory> selectAllCategoriesByLevel1(Integer id);

    /**
     * 查询首页的商品分类信息
     * @return 商品分类信息
     */
    MarketCategory selectIndexCategory();

    int selectPid(int id);

    List<Integer> selectChildIds(int id);
}